﻿namespace Creek.UI.EFML.Base.EFML.Processors
{
    using System.Xml;

    using Creek.UI.EFML.UI_Elements;

    public class VideoProcessor : ElementProcessor
    {
        #region Public Properties

        public override string Tagname
        {
            get
            {
                return "video";
            }
        }

        #endregion

        #region Public Methods and Operators

        public override void Process(out UiElement ui, XmlNode t, Builder b)
        {
            var uui = new AudioElement
                {
                    Type = t.GetAttributeByName("type"),
                    Source = t.GetAttributeByName("src"),
                    AutoPlay = t.HasAttribute("autoplay")
                };
            ui = uui;
        }

        #endregion
    }
}